{% extends '@WebsiteBundle/layout/baselayout.html.twig' %}
{% import "@WebsiteBundle/macros/pagination.html.twig" as macros %}
{% block body_main %}
	{{ parent() }}
	<div class="page">
		{{ render(path('app_header', {"route":route})) }}
		<div class="page-wrapper">
			<div class="page-body">
				<div class="container-xl">
					<div class="row row-deck row-cards">
						<div class="col-lg-2">
							{{ render(path('app_user_userNav', {route:route})) }}
						</div>
						<div class="col-lg-10">
							<div class="card">
								<div class="card-body">
									{% if list is empty %}
										{{ include('@WebsiteBundle/empty.html.twig',{msg:'数据为空!'}) }}
									{% else %}
										<div class="row row-deck row-cards">
											{% for v in list %}
												<div class="col-lg-6">
													<div class="card">
														<div class="card-header">{{ v['name'] }}</div>
														<div class="card-body">
															<div class="d-flex flex-row mb-3">
																<div class="p-2">订单编号:&nbsp;&nbsp;{{ v['orderNo'] }}</div>
															</div>
															<div class="d-flex flex-row mb-3">
																<div class="p-2">下单时间:&nbsp;&nbsp;{{ v['createdAt'] }}</div>
															</div>
															<div class="d-flex flex-row mb-3">
																<div class="p-2">实付金额:
																	{% if v['orderAmount'] >0 %}
																		<span class="badge bg-red">¥{{ v['orderAmount'] }}</span>
																	{% else %}
																		<span class="badge bg-teal">免费</span>
																	{% endif %}
																</div>
																<div class="p-2">状态:&nbsp;&nbsp;{{ v['orderStatusView'] }}</div>
															</div>
														</div>
														<div class="card-footer">
															<a class="btn btn-primary btn-sm" href="{{ path('app_order_detail', {orderNo:v['orderNo']}) }}">订单详情</a>
														</div>
													</div>
												</div>
											{% endfor %}
										</div>
									{% endif %}
									{{ macros.pagination(pagination) }}
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		{{ render(path('app_footer')) }}
	</div>
{% endblock %}
